<template>
  <div>
    <!-- <child-cpn><button>哈哈哈</button></child-cpn> -->
    <show-names :names="names">
      <template v-slot="slotProps">
        <button>{{slotProps.index}}-{{slotProps.item}}</button>
      </template>
    </show-names>
  </div>
</template>

<script>
import ChildCpn from "./ChildCpn.vue";
import ShowNames from "./ShowNames.vue";

export default {
  data() {
    return {
      names: ["why", "kobe", "james", "curry"],
    };
  },
  components: { ChildCpn, ShowNames },
};
</script>

<style scoped></style>
